package com.example.mapper;

import com.example.entity.Admin;
import com.example.entity.Helper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;


public interface HelperMapper {



    @Select("select * from helper where username = #{username}")
    Helper selectByUsername(String username);


    @Select("select * from helper where id=#{id}")
    Helper selectById(Integer id);


    @Update("update helper set money = money + #{money} where id = #{helperId}")
    void addmoney(Integer helperId, Integer money);
    /**
     * 新增
     */
    int insert(Admin admin);

    /**
     * 删除
     */
    int deleteById(Integer id);

    /**
     * 修改
     */
    int updateById(Admin admin);


    /**
     * 查询所有
     */
    List<Helper> selectAll(Admin admin);
}
